package com.jvxb.manage.livable.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author jvxb
 * @since 2022-01-26
 */
@Data
@TableName("db_deploy_instance")
public class DbDeployInstance implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "部署申请ID")
    private Integer deployId;
    @ApiModelProperty(value = "数据库类型 mysql / redis / es / mongodb / tidb")
    private String dbType;
    @ApiModelProperty(value = "机器ip")
    private String host;
    @ApiModelProperty(value = "端口")
    private String port;
    @ApiModelProperty(value = "角色")
    private String role;
    @ApiModelProperty(value = "机房地址")
    private String idcCode;
    @ApiModelProperty(value = "冗余字段 机房名称")
    private String idcName;
    @ApiModelProperty(value = "集群环境 prd / pre / press / test / dev")
    private String env;
    @ApiModelProperty(value = "实例版本")
    private String version;
    @ApiModelProperty(value = "0未部署 1部署中 2部署成功 3部署失败")
    private Integer deployStatus;
    @ApiModelProperty(value = "扩展字段1")
    private String param1;
    @ApiModelProperty(value = "扩展字段2")
    private String param2;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    public static final String ID = "id";

    public static final String DEPLOY_ID = "deploy_id";

    public static final String DB_TYPE = "db_type";

    public static final String HOST = "host";

    public static final String PORT = "port";

    public static final String ROLE = "role";

    public static final String IDC_CODE = "idc_code";

    public static final String IDC_NAME = "idc_name";

    public static final String ENV = "env";

    public static final String VERSION = "version";

    public static final String PARAM1 = "param1";

    public static final String PARAM2 = "param2";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String DEPLOY_STATUS = "deploy_status";
    public static final Integer DEPLOY_STATUS_SUCCESS = 2;
    public static final Integer DEPLOY_STATUS_ERROR = 3;


    private static final long serialVersionUID = 5128377915775178199L;

}
